<?php echo $this->Html->script(array('ckeditor/ckeditor','ckeditor/adapters/jquery'));?>
<script type="text/javascript">
jQuery(function(){
	var config = {toolbar:[['Source','Bold', 'Italic', '-', 'NumberedList', 'BulletedList'],['UIColor']],height:150};
	jQuery('.textarea textarea').ckeditor(config);
});
//图片选择callback
uploadPicCallback = function(data){
	jQuery('#venue_preview').attr('src',GM.RootScript+'/img/'+data.pic_link+'.100x100.'+data.ext);
	jQuery('#VenueSysPhotoId').val(data.pic_id);
};
</script>
<h1><?php echo $this->Html->image('bootstrap/posts.png')?>修改场馆</h1>
<div class="bloc">
	<div class="title">
		<?php echo $this->element('admin/bread')?>
	</div>
    <div class="content">
	<?php echo $this->Form->create('Venue'); ?>
	<table style = 'width:100%'>
		<tr>
			<td width = "50%">
				<?php 
					echo $this->Form->input('id');
					echo $this->Form->input('sys_website_id',array('label'=>'所属站点','style'=>'z-index: -1;','options'=>$SysWebsite,'default'=>$this->Session->read('SITEID')));
					echo $this->Form->input('sys_city_id',array('label'=>'所在城市','type'=>'hidden'));
					echo $this->Form->input('sys_area_id',array('label'=>'所属地区'));
				?>
			</td>
			<td width = "50%">
				<label>场馆预览</label>
				<?php 
					echo $this->Form->input('sys_photo_id',array('type'=>'hidden'));
					if ($this->request->data['SysPhoto']['id']>0){
						$imgsrc = thumb($this->request->data['SysPhoto']);
					}else{
						$imgsrc = 'Album.nopic.jpg';
					}
					echo $this->Html->image($imgsrc,array('style'=>'float:left','id'=>'venue_preview'));
					echo $this->element('Album.ajaxUploadForm',array('upload'=>true,'list'=>true,'album_id'=>4,'userCallback'=>'uploadPicCallback'));
				?>
			</td>
		</tr>
		<tr>
			<td colspan = 2>
				<?php echo $this->element('SeoMeta.seometa');?>
				<br/>
			</td>
		</tr>
		<tr>
			<td> <?php echo $this->Form->input('title_cn',array('label'=>'场馆名称（中文）')); ?></td>
			<td><?php  echo $this->Form->input('title_en',array('label'=>'场馆名称（英文）')); ?></td>
		</tr>
		<tr>
			<td><?php echo $this->Form->input('way_address',array('label'=>'详细地址')); ?></td>
			<td>
				<?php echo $this->Form->input('map_point',array('label'=>'地图坐标','onclick'=>'Bmap.mark_on_map()')); ?>
					<?php echo $this->element('Bmap.bmap.markpoint')?>
			</td>
		</tr>
		<tr>
			<td colspan = 2 class = 'group_check'>
				<div class="input text required">
					<label>适演剧种</label>
					<br/><br/>
					<?php echo $this->Form->select('usefor',$usefor,array('type'=>'checkbox','multiple' => 'checkbox')); ?>
					<br/>
				</div>
			</td>
		</tr>
		<tr>
			<td colspan = 2><?php echo $this->Form->input('description',array('label'=>'场馆描述')); ?></td>
		</tr>
		<tr>
			<td colspan = 2><?php echo $this->Form->input('way_driver',array('label'=>'驾车信息')); ?></td>
		</tr>
		<tr>
			<td colspan = 2><?php echo $this->Form->input('way_bus',array('label'=>'公交信息')); ?></td>
		</tr>
		<tr>
			<td colspan = 2><?php echo $this->Form->input('way_parking',array('label'=>'停车信息')); ?></td>
		</tr>
		<tr>
			<td colspan = 2><?php echo $this->Form->input('way_around',array('label'=>'场馆周边')); ?></td>
		</tr>
		<tr>
			<td colspan = 2>
				<?php 
					echo $this->Form->input('count_tickets',array('default'=>0,'type'=>'hidden')); 
					echo $this->Form->input('sort',array('label'=>'排序','default'=>100));
					echo $this->Form->input('sort_top',array('label' => '置顶','type'=>'checkbox'));
					echo $this->Form->input('enable',array('label' => '启用','type'=>'checkbox','default'=>1));
				?>
			</td>
		</tr>
		<tr>
			<td colspan = 2><?php echo $this->Form->submit('Submit'); ?></td>
		</tr>
	</table>
	<?php echo $this->Form->end(); ?>
	</div>
</div>
<style>
.group_check div.checkbox{width: 80px;float: left;}
.group_check label{display:inline !important;}
</style>
